package com.xbongbong.pro.print.pojo.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

/**
 * 获取打印的审批业务数据
 *
 * @author: hongxiao
 * @date: 2020-02-10 09:50
 * @since: v4.13.0
 */
@Getter
@Setter
@ToString
public class PaasPrintGetDataByProcessDTO extends BaseDTO {
	private static final long serialVersionUID = 1L;
    
    /**
     * 流程类型
     */
    @NotNull(message = "流程类型不能为空")
    private String processType;
    /**
     * 应用id
     */
    private Long appId;
    /**
     * 菜单id
     */
    private Long menuId;
    /**
     * 表单id
     */
    @NotNull(message = "表单id不能为空")
    private Long formId;
    /**
     * 是否是saas 1：saas  2：paas
     */
    @DecimalMin(value = "1", message = "saasMark的值只能为1，2")
    @DecimalMax(value = "2", message = "saasMark的值只能为1，2")
    @NotNull(message = "saas标记不能为空")
    private Integer saasMark;
    /**
     * 业务类型
     */
    private Integer businessType;
    /**
     * 流程任务id
     */
    @NotNull(message = "流程任务节点id不能为空")
    private Long processNodeTaskId;

    /**
     * 表单数据
     */
    @NotNull(message = "流程任务id不能为空")
    private Long processTaskId;

    //这个DTO必须要加上这个无参构造器否则会报错,反序列化会出问题
    public PaasPrintGetDataByProcessDTO() {
    }

    public PaasPrintGetDataByProcessDTO(Long processTaskId, Long processNodeTaskId) {
        this.processTaskId = processTaskId;
        this.processNodeTaskId = processNodeTaskId;
    }
}